﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;
using SAR.Pages;

namespace SAR
{
    public partial class QiTaCanShu:BasePageClass,PageWithParent
    {

        public QiTaCanShu()
        {
            this.InitializeComponent();

            this.QiTaCanShuGrid.Visibility = Visibility.Visible;

            this.QiTaCanShuTableGrid.Visibility = Visibility.Hidden;
            this.QiTaCanShuChartGrid.Visibility = Visibility.Hidden;
            this.SAR_TableHead.SARIsUnfolded = false;

        }


        //父亲引用
        private DesignPageControl parentCtr;

        private void SAR_TableHead_SARClick(object sender, MouseButtonEventArgs e)
        {
            this.QiTaCanShuGrid.Visibility = Visibility.Hidden;
            this.QiTaCanShuTableGrid.Visibility = Visibility.Visible;
        }

        private void SAR_TableHead1_SARClick(object sender, MouseButtonEventArgs e)
        {
            this.QiTaCanShuGrid.Visibility = Visibility.Visible;
            this.QiTaCanShuTableGrid.Visibility = Visibility.Hidden;
        }

        public bool PreClick()
        {


            return true;
        }

        public bool NextClick()
        {
            return true;
        }

        //信号带宽按钮点击事件
        private void xinHaoDaiKuanBtn_SARClick(object sender, MouseButtonEventArgs e)
        {
            this.QiTaCanShuGrid.Visibility = Visibility.Hidden;
            this.QiTaCanShuTableGrid.Visibility = Visibility.Hidden;
            this.QiTaCanShuChartGrid.Visibility = Visibility.Visible;
            this.QiTaCanShuSARChart.SARChartTitle = "信号带宽变化曲线";
            parentCtr.preStepButton.Visibility = Visibility.Hidden;
            parentCtr.nextStepButton.Visibility = Visibility.Hidden;

            parentCtr.SARSureBtn.Visibility = Visibility.Visible;
            parentCtr.SARCancelBtn.Visibility = Visibility.Visible;

        }

        //信号脉宽按钮点击事件
        private void xinHaoMaiKuanBtn_SARClick(object sender, MouseButtonEventArgs e)
        {
            this.QiTaCanShuGrid.Visibility = Visibility.Hidden;
            this.QiTaCanShuTableGrid.Visibility = Visibility.Hidden;
            this.QiTaCanShuChartGrid.Visibility = Visibility.Visible;
            this.QiTaCanShuSARChart.SARChartTitle = "功率孔径积曲线";
            parentCtr.preStepButton.Visibility = Visibility.Hidden;
            parentCtr.nextStepButton.Visibility = Visibility.Hidden;

            parentCtr.SARSureBtn.Visibility = Visibility.Visible;
            parentCtr.SARCancelBtn.Visibility = Visibility.Visible;

        }


        public void SetParent(Page parent)
        {
            this.parentCtr = parent as DesignPageControl;
        }

        //确定按钮点击事件
        public void SARSureClick()
        {

        }

        //取消按钮点击，直接返回！
        public void SARCancelClick()
        {
            return;
        }
    }
}